<?php

namespace mpend\modules\commission\models;

/**
 * 分销中心会员信息基础
 *
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class CommissionMenusLogic extends \common\models\member\Member {

    /**
     * 分销中心会员信息基础
     *
     * @author emhome <emhome@163.com>
     * @since 1.0
     */
    public function buildQuery() {
        $query = static::find()->alias('t')->active(static::STATUS_ACTIVE);
        $query->innerJoinWith('stats s', true);
        $query->innerJoinWith('specialProduct sp');
        $query->andWhere(['sp.activity_id' => $this->activity_id]);
        return $query;
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id',
            'user',
            'type',
            'level',
            'scale',
            'experience',
            'expired_at',
            'qrcode',
        ];
    }

}
